package org.pearl.spring.demo.pojo;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

/**
 * Created by TD on 2021/5/19
 */
@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
@Component()
public class Animal {

    String name;

    Integer age;

    public  void eat(String name) {
        System.out.println("Animal eating " + name);
    }
}
